﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SinaApi;

namespace TestAPIConsole
{
    class Program
    {
        static void Main(string[] args)
        {
            //Console.WriteLine("TestGetNewStatuses:");
            //TestGetNewStatuses();
            //Console.WriteLine("TestGetALLStatues:");
            //TestGetAllStatues();
            //Console.WriteLine("TestComment:");
            //TestComment(7172294559, "回复测试啦"+DateTime.Now);
            //Console.WriteLine("TestGetUncommentStatues:");
            //TestGetUncommentStatues();

            TestGetAndRelpy();
            //TestPost();
            Console.ReadKey();
        }

        static void TestPost()
        {
            var sinaService = new SinaBlogApiService();
            sinaService.ToUpdate("superwolf");
            sinaService.ToUpdate("superwolf @青山老妖_黄冠");
        }

        static void TestGetAndRelpy()
        {
            ISinaBlogService service = new SinaBlogApiService("qgd.weibo.superwolf@gmail.com", "superwolf");
            var status = service.GetStatuses();
            foreach (var statuse in status)
            {
                Console.WriteLine(statuse.user.screen_name + statuse.text);
                service.ToComment(statuse.id,statuse.text);
            }

        }
    }
}
